package org.example.petitionplatformsystem.webRTC;

import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

@Getter
@Setter
public class StaticModel {
    public static List<CallingRoom> roomList = new CopyOnWriteArrayList<>();

    public static CallingRoom getRoomByRoomId(Long roomId) {
        for (CallingRoom room : roomList) {
            if (room.getRoomId().equals(roomId)) {
                return room;
            }
        }
        return null; // 如果未找到，返回 null
    }
}

